// PalindromeNumber.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
bool isPalindrome(int x) 
{
	// Start typing your C/C++ solution below
	// DO NOT write int main() function
	if(x < 0) return false;
	if(x == 0) return true;
	int nDiv = 1;
	while(x/nDiv >= 10)
		nDiv*=10;

	while(x!=0)
	{
		int l = x/nDiv;
		int r = x%10;
		if(l != r) return false;
		x = (x%nDiv)/10;
		nDiv /=100;
	}
	return true;
}

int _tmain(int argc, _TCHAR* argv[])
{
	return 0;
}

